using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICStockBillMap : EntityTypeConfiguration<ICStockBill>
    {
        public ICStockBillMap()
        {
            // Primary Key
            this.HasKey(t => t.FInterID);

            // Properties
            this.Property(t => t.FBrNo)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.FInterID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FBillNo)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FUse)
                .HasMaxLength(255);

            this.Property(t => t.FNote)
                .HasMaxLength(255);

            this.Property(t => t.FSCBillNo)
                .HasMaxLength(30);

            this.Property(t => t.FRSCBillNo)
                .HasMaxLength(30);

            this.Property(t => t.FOperDate)
                .IsFixedLength()
                .HasMaxLength(8)
                .IsRowVersion();

            this.Property(t => t.FExplanation)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FFetchAdd)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FPOSName)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FPOOrdBillNo)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0146)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0147)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0149)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfA0228)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0152)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0153)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0154)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0156)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0157)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfD0132)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfD0133)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0161)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0162)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0163)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0164)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0159)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0167)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0937)
                .HasMaxLength(255);

            this.Property(t => t.FHeadSelfB0148)
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("ICStockBill");
            this.Property(t => t.FBrNo).HasColumnName("FBrNo");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FTranType).HasColumnName("FTranType");
            this.Property(t => t.FDate).HasColumnName("FDate");
            this.Property(t => t.FBillNo).HasColumnName("FBillNo");
            this.Property(t => t.FUse).HasColumnName("FUse");
            this.Property(t => t.FNote).HasColumnName("FNote");
            this.Property(t => t.FDCStockID).HasColumnName("FDCStockID");
            this.Property(t => t.FSCStockID).HasColumnName("FSCStockID");
            this.Property(t => t.FDeptID).HasColumnName("FDeptID");
            this.Property(t => t.FEmpID).HasColumnName("FEmpID");
            this.Property(t => t.FSupplyID).HasColumnName("FSupplyID");
            this.Property(t => t.FPosterID).HasColumnName("FPosterID");
            this.Property(t => t.FCheckerID).HasColumnName("FCheckerID");
            this.Property(t => t.FFManagerID).HasColumnName("FFManagerID");
            this.Property(t => t.FSManagerID).HasColumnName("FSManagerID");
            this.Property(t => t.FBillerID).HasColumnName("FBillerID");
            this.Property(t => t.FReturnBillInterID).HasColumnName("FReturnBillInterID");
            this.Property(t => t.FSCBillNo).HasColumnName("FSCBillNo");
            this.Property(t => t.FHookInterID).HasColumnName("FHookInterID");
            this.Property(t => t.FVchInterID).HasColumnName("FVchInterID");
            this.Property(t => t.FPosted).HasColumnName("FPosted");
            this.Property(t => t.FCheckSelect).HasColumnName("FCheckSelect");
            this.Property(t => t.FCurrencyID).HasColumnName("FCurrencyID");
            this.Property(t => t.FSaleStyle).HasColumnName("FSaleStyle");
            this.Property(t => t.FAcctID).HasColumnName("FAcctID");
            this.Property(t => t.FROB).HasColumnName("FROB");
            this.Property(t => t.FRSCBillNo).HasColumnName("FRSCBillNo");
            this.Property(t => t.FStatus).HasColumnName("FStatus");
            this.Property(t => t.FUpStockWhenSave).HasColumnName("FUpStockWhenSave");
            this.Property(t => t.FCancellation).HasColumnName("FCancellation");
            this.Property(t => t.FOrgBillInterID).HasColumnName("FOrgBillInterID");
            this.Property(t => t.FBillTypeID).HasColumnName("FBillTypeID");
            this.Property(t => t.FPOStyle).HasColumnName("FPOStyle");
            this.Property(t => t.FMultiCheckLevel1).HasColumnName("FMultiCheckLevel1");
            this.Property(t => t.FMultiCheckLevel2).HasColumnName("FMultiCheckLevel2");
            this.Property(t => t.FMultiCheckLevel3).HasColumnName("FMultiCheckLevel3");
            this.Property(t => t.FMultiCheckLevel4).HasColumnName("FMultiCheckLevel4");
            this.Property(t => t.FMultiCheckLevel5).HasColumnName("FMultiCheckLevel5");
            this.Property(t => t.FMultiCheckLevel6).HasColumnName("FMultiCheckLevel6");
            this.Property(t => t.FMultiCheckDate1).HasColumnName("FMultiCheckDate1");
            this.Property(t => t.FMultiCheckDate2).HasColumnName("FMultiCheckDate2");
            this.Property(t => t.FMultiCheckDate3).HasColumnName("FMultiCheckDate3");
            this.Property(t => t.FMultiCheckDate4).HasColumnName("FMultiCheckDate4");
            this.Property(t => t.FMultiCheckDate5).HasColumnName("FMultiCheckDate5");
            this.Property(t => t.FMultiCheckDate6).HasColumnName("FMultiCheckDate6");
            this.Property(t => t.FCurCheckLevel).HasColumnName("FCurCheckLevel");
            this.Property(t => t.FTaskID).HasColumnName("FTaskID");
            this.Property(t => t.FResourceID).HasColumnName("FResourceID");
            this.Property(t => t.FBackFlushed).HasColumnName("FBackFlushed");
            this.Property(t => t.FWBInterID).HasColumnName("FWBInterID");
            this.Property(t => t.FTranStatus).HasColumnName("FTranStatus");
            this.Property(t => t.FZPBillInterID).HasColumnName("FZPBillInterID");
            this.Property(t => t.FRelateBrID).HasColumnName("FRelateBrID");
            this.Property(t => t.FPurposeID).HasColumnName("FPurposeID");
            this.Property(t => t.FUUID).HasColumnName("FUUID");
            this.Property(t => t.FRelateInvoiceID).HasColumnName("FRelateInvoiceID");
            this.Property(t => t.FOperDate).HasColumnName("FOperDate");
            this.Property(t => t.FImport).HasColumnName("FImport");
            this.Property(t => t.FSystemType).HasColumnName("FSystemType");
            this.Property(t => t.FMarketingStyle).HasColumnName("FMarketingStyle");
            this.Property(t => t.FPayBillID).HasColumnName("FPayBillID");
            this.Property(t => t.FCheckDate).HasColumnName("FCheckDate");
            this.Property(t => t.FExplanation).HasColumnName("FExplanation");
            this.Property(t => t.FFetchAdd).HasColumnName("FFetchAdd");
            this.Property(t => t.FFetchDate).HasColumnName("FFetchDate");
            this.Property(t => t.FManagerID).HasColumnName("FManagerID");
            this.Property(t => t.FRefType).HasColumnName("FRefType");
            this.Property(t => t.FSelTranType).HasColumnName("FSelTranType");
            this.Property(t => t.FChildren).HasColumnName("FChildren");
            this.Property(t => t.FHookStatus).HasColumnName("FHookStatus");
            this.Property(t => t.FActPriceVchTplID).HasColumnName("FActPriceVchTplID");
            this.Property(t => t.FPlanPriceVchTplID).HasColumnName("FPlanPriceVchTplID");
            this.Property(t => t.FProcID).HasColumnName("FProcID");
            this.Property(t => t.FActualVchTplID).HasColumnName("FActualVchTplID");
            this.Property(t => t.FPlanVchTplID).HasColumnName("FPlanVchTplID");
            this.Property(t => t.FBrID).HasColumnName("FBrID");
            this.Property(t => t.FVIPCardID).HasColumnName("FVIPCardID");
            this.Property(t => t.FVIPScore).HasColumnName("FVIPScore");
            this.Property(t => t.FHolisticDiscountRate).HasColumnName("FHolisticDiscountRate");
            this.Property(t => t.FPOSName).HasColumnName("FPOSName");
            this.Property(t => t.FWorkShiftId).HasColumnName("FWorkShiftId");
            this.Property(t => t.FCussentAcctID).HasColumnName("FCussentAcctID");
            this.Property(t => t.FZanGuCount).HasColumnName("FZanGuCount");
            this.Property(t => t.FPOOrdBillNo).HasColumnName("FPOOrdBillNo");
            this.Property(t => t.FLSSrcInterID).HasColumnName("FLSSrcInterID");
            this.Property(t => t.FSettleDate).HasColumnName("FSettleDate");
            this.Property(t => t.FManageType).HasColumnName("FManageType");
            this.Property(t => t.FHeadSelfB0146).HasColumnName("FHeadSelfB0146");
            this.Property(t => t.FHeadSelfB0147).HasColumnName("FHeadSelfB0147");
            this.Property(t => t.FHeadSelfB0149).HasColumnName("FHeadSelfB0149");
            this.Property(t => t.FHeadSelfA0228).HasColumnName("FHeadSelfA0228");
            this.Property(t => t.FHeadSelfB0152).HasColumnName("FHeadSelfB0152");
            this.Property(t => t.FHeadSelfB0433).HasColumnName("FHeadSelfB0433");
            this.Property(t => t.FHeadSelfA0229).HasColumnName("FHeadSelfA0229");
            this.Property(t => t.FHeadSelfB0153).HasColumnName("FHeadSelfB0153");
            this.Property(t => t.FHeadSelfB0154).HasColumnName("FHeadSelfB0154");
            this.Property(t => t.FOrderAffirm).HasColumnName("FOrderAffirm");
            this.Property(t => t.FHeadSelfB0156).HasColumnName("FHeadSelfB0156");
            this.Property(t => t.FHeadSelfB0157).HasColumnName("FHeadSelfB0157");
            this.Property(t => t.FHeadSelfD0132).HasColumnName("FHeadSelfD0132");
            this.Property(t => t.FHeadSelfD0133).HasColumnName("FHeadSelfD0133");
            this.Property(t => t.FHeadSelfB0936).HasColumnName("FHeadSelfB0936");
            this.Property(t => t.FHeadSelfB0161).HasColumnName("FHeadSelfB0161");
            this.Property(t => t.FHeadSelfB0162).HasColumnName("FHeadSelfB0162");
            this.Property(t => t.FHeadSelfB0163).HasColumnName("FHeadSelfB0163");
            this.Property(t => t.FHeadSelfB0164).HasColumnName("FHeadSelfB0164");
            this.Property(t => t.FHeadSelfB0159).HasColumnName("FHeadSelfB0159");
            this.Property(t => t.FHeadSelfB0151).HasColumnName("FHeadSelfB0151");
            this.Property(t => t.FHeadSelfB0167).HasColumnName("FHeadSelfB0167");
            this.Property(t => t.FHeadSelfB0160).HasColumnName("FHeadSelfB0160");
            this.Property(t => t.FHeadSelfB0937).HasColumnName("FHeadSelfB0937");
            this.Property(t => t.FHeadSelfB0434).HasColumnName("FHeadSelfB0434");
            this.Property(t => t.FHeadSelfB0148).HasColumnName("FHeadSelfB0148");
        }
    }
}
